package com.demo;

import dev.langchain4j.model.openai.OpenAiChatModel;

public class HelloWorld {
	
	public static void main(String[] args) {
		OpenAiChatModel model = OpenAiChatModel.builder()
			.baseUrl("https://dashscope.aliyuncs.com/compatible-mode/v1")
			.apiKey(System.getenv("DASHSCOPE_API_KEY"))
			.modelName("qwen-turbo")
			.logRequests(true)
			.logResponses(true)
			.build();
		
		String result = model.chat("你好");
		System.out.println(result);
	}

}
